<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>标题内容</title>
<%@include file="/WEB-INF/jsp/public/commons.jspf"%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/style.css">
</head>
	<body style="background-color: #D1E8FF;">
<nav class="navbar navbar-default navbar-fixed-top">
	<div class="container">
		<div class="navbar-header">
			<a href="${pageContext.request.contextPath }/home_outerCentre.action" onclick="changeActive(1)" target="centre" class="navbar-brand logo">
			    <img src="${pageContext.request.contextPath }/images/wuye.jpg" style="width: 80px;height: 40px;margin: 5px 70px;">
			 </a>
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
		</div>
		<div class="collapse navbar-collapse" id="navbar-collapse">
			<ul class="nav navbar-nav">
				<li class="active" value="1" onclick="changeActive(1)"><a href="${pageContext.request.contextPath }/home_outerCentre.action" target="centre"><span class="glyphicon glyphicon-home"></span> 首页</a></li>
				<li value="2" onclick="changeActive(2)"><a href="${pageContext.request.contextPath }/forum_prelist.action" target="centre"><span class="glyphicon glyphicon-globe"></span> 论坛</a></li>
				<li value="3" onclick="changeActive(3)"><a href="${pageContext.request.contextPath }/news_findAllNews.action?newsType=0" target="centre"><span class="glyphicon glyphicon-fire"></span> 新闻</a></li>
				<c:if test="${user.type==0}">
					<li value="4" onclick="changeActive(4)"><a href="${pageContext.request.contextPath }/respond_responseUI.action" target="centre"><span class="glyphicon glyphicon-question-sign"></span> 问卷</a></li>
					<li value="5" onclick="changeActive(5)"><a href="${pageContext.request.contextPath }/complain_complainUI.action" target="centre"><span class="glyphicon glyphicon-question-sign"></span> 投诉</a></li>
				</c:if>
				<c:if test="${ user==null}">
					<li value="4" onclick="changeActive(4)"><a href="${pageContext.request.contextPath }/respond_responseUI.action" target="centre"><span class="glyphicon glyphicon-question-sign"></span> 问卷</a></li>
					<li value="5" onclick="changeActive(5)"><a href="${pageContext.request.contextPath }/complain_complainUI.action" target="centre"><span class="glyphicon glyphicon-question-sign"></span> 投诉</a></li>					
				</c:if>
			</ul>
			<div class="navbar-form navbar-right">
				<c:if test="${user!=null}">
					<a href="${pageContext.request.contextPath }/personal_center.action?id=${user.id}" target="centre"><img style="width: 65px;height: 42px;" class="img-circle" src="${pageContext.request.contextPath }${ user.photo}"></a>
					<a href="${pageContext.request.contextPath }/user_loginOut.action" style="margin-left: 20px;" class="navbar-link">退出</a>
					<c:if test="${user.type==1}">
						<a href="${pageContext.request.contextPath }/home_innerIndex.action" style="padding-left: 5px;" class="img-rounded"><span class="glyphicon glyphicon-log-out"></span> 进入后台</a>
					</c:if>
            	</c:if>
				<c:if test="${ user==null}">
	                <a href="${pageContext.request.contextPath }/user_login.action" class="navbar-link">登陆</a>
	                <a href="${pageContext.request.contextPath }/user_registUI.action" target="_parent" class="navbar-link">注册</a>
            	</c:if>
            </div>
		</div>
	</div>
</nav>
<script type="text/javascript">
     function changeActive(i){
    	 $("ul li").attr("class","");
		 $("ul li[value='"+i+"']").attr("class","active");
     }
</script>

	</body>
</html>